﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPages/SimpleMasterPages.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="MasterPages_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <style type="text/css">
        .test
        {
            position:relative;
            -webkit-transition: all 1s ease-in-out;
            -moz-transition: all 1s ease-in-out;
            -o-transition: all 1s ease-in-out;
            -ms-transition: all 1s ease-in-out;
        }        
    </style>
    <script type="text/javascript">
        var contents1, contents2, contents3;
        var num1, num2, num3;
        window.onload = function () {
            contents1 = document.getElementById('content1').getElementsByTagName("span");
            contents2 = document.getElementById('content2').getElementsByTagName("span");
            contents3 = document.getElementById('content3').getElementsByTagName("span");
            num1 = Math.floor(Math.random() * contents1.length);
            num2 = Math.floor(Math.random() * contents2.length);
            num3 = Math.floor(Math.random() * contents3.length);
            slide();
        }
        function slide() {
            if (++num1 > contents1.length - 1)
                num1 = 0;
            if (++num2 > contents2.length - 1)
                num2 = 0;
            if (++num3 > contents3.length - 1)
                num3 = 0;
            for (var i = 0; i < contents1.length; i++) {
                if (i != num1)
                    contents1[i].style.display = 'none';
                else {
                    contents1[i].style.display = 'inline'
                }
            }
            for (var i = 0; i < contents2.length; i++) {
                if (i != num2)
                    contents2[i].style.display = 'none';
                else {
                    contents2[i].style.display = 'inline'
                }
            }
            for (var i = 0; i < contents3.length; i++) {
                if (i != num3)
                    contents3[i].style.display = 'none';
                else {
                    contents3[i].style.display = 'inline'
                }
            }
            setTimeout("slide()", 5000);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="asizeleft" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="sectionContent" Runat="Server">
     <div style="display: inline-block; width:100%">
        <div style="display: inline-block; float:left; width: 65%;">
            <header style="margin-top:50px; margin-bottom:10px;">ĐĂNG NHẬP</header>
            <article>
                <asp:Label ID="lbGioiThieu" runat="server" 
                Text="Website cung cấp cho người dùng một địa chỉ để mua bán, trao đổi, tìm kiếm các phần mềm phục vụ cho ngu cầu."></asp:Label><br />
                Đăng nhập ở bên phải hoặc <a href="Register.aspx">tạo tài khoản miễn phí</a>        <br />
            <%--   <div style="width:100%;display: table; margin-top: 20px;">
                    <image style="display:table-cell; width:10%; height:45px; " id="image1" runat="server" url="<%$ Resources:Images, imageLogin1 %>"></image>
                    <div style="padding-left:10px; display:table-cell; width:80%; vertical-align:middle" >
                        <asp:Label ID="lbHeader1" runat="server" meta:resourcekey="lbHeader1Resource1" 
                            style="font-weight: 700" ></asp:Label><br />
                        <div >
                            <asp:Label ID="lbParam1" runat="server" onclick="displayResult()" meta:resourcekey="lbParam1Resource1" ></asp:Label>
                        </div>
                        
                    </div>
                </div>--%>
                <div id="divInfo" runat="server" ></div>

             </article>
        </div>
        <div style="border: 1px solid #E7EEF6;float:right; margin-top:30px; background-color:rgba(245,245,245,1); width: 30%; margin-top:50px;">
            <h4 style= "background-color: #F5F5F5;    color: #3366CC;    padding: 10px;  text-align: center; font-size:large;">Đăng nhập</h4>
            <div style="padding:0px 15px;">
                <strong style="display:block; margin:5px;">Tên đăng nhập</strong>
                <input id="tbTenDangNhap" type="text" style="width:97%" runat="server" />            
                <strong style="display:block; margin:5px;">Mật khẩu</strong>
                <input id="tbMatKhau" type="password" style="width:97%; margin-bottom:5px;" runat="server"  />   
                <div id="divCapcha" style="display:none;" runat="server">
                     <strong style="display:block; margin:5px;">Mã an toàn</strong>
                     <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>                        
                            <asp:Image ID="ImageCapCha" Height="50px" Width="100px" runat="server" 
                                ImageUrl="capcha.aspx" />
                            <asp:ImageButton ID="btnRefreshCapcha"                                 
                                runat="server" 
                                style="display:inline-block; margin-bottom:9px; margin-left:5px; " 
                                Height="30px" Width="30px"                    
                                OnClientClick="window.location.reload()" ImageUrl="<%$ Resources:Images, refreshCapcha %>" 
                                ></asp:ImageButton>                             
                        </ContentTemplate>
                        <Triggers>
                            <asp:PostBackTrigger ControlID="btnRefreshCapcha" />
                        </Triggers>
                    </asp:UpdatePanel>     
                     <strong style="display:inline-block; margin:5px;">Xác nhận mã an toàn</strong>
                                             
                     <input id="tbMaAnToan" type="text" style="width:97%; margin-bottom:5px;" 
                         runat="server"  />   
                </div>         
                <input id="rememberme" type="checkbox" runat="server">Nhớ mật khẩu</input>
                <a>Quyên mật khẩu ?</a><br />
            </div>
            <div style="display:block; text-align:center; padding:10px;">
                <%--<asp:Label ID="alert"  runat="server" style="color: #FF3300; display:none;"></asp:Label> --%>
                    <asp:CustomValidator 
                         ID="custValidatorCapcha" runat="server" 
                            ErrorMessage="Nhập mã an toàn không chính xác" 
                            ControlToValidate="tbMaAnToan" 
                            ValidationGroup="Login" 
                            ValidateEmptyText="True" Enabled="false" 
                    style="display:block; text-align:left;" Display="Dynamic" 
                    onservervalidate="custValidatorCapcha_ServerValidate"></asp:CustomValidator>
                    <asp:CustomValidator 
                         ID="custValidatorLogin" runat="server" 
                            ErrorMessage="Tài khoản hoặc mật khẩu không chính xác" 
                            ValidationGroup="Login" 
                            ValidateEmptyText="True" Enabled="true"  style="display:block; text-align:left;"
                            Display="Dynamic" 
                    onservervalidate="custValidatorLogin_ServerValidate"></asp:CustomValidator>  
                <asp:LinkButton style="display:inline-block; " class="btnType1" ID="btnLogin" 
                    runat="server" ValidationGroup="Login" onclick="btnLogin_Click">Đăng nhập</asp:LinkButton>
                <input id="btnOpenID" class="btnType1" tyle="display:inline-block; " 
                    type="button" value="OpenID"  onclick="toggleShowOjb('divOpenID')" />
                
            </div>      
            <div id="divOpenID" style="display:none; text-align:center; width:100%;">
                <asp:ImageButton CssClass="imageBtn" ID="btnGoogleID" 
                    style="height:32px;padding:3px; margin-bottom:4px; " 
                    ImageUrl="<%$ Resources:Images, google %>" runat="server"  
                    CommandArgument="https://www.google.com/accounts/o8/id" 
                    onclick="btnOpenID_Click" />
                <asp:ImageButton CssClass="imageBtn" ID="btnYahooID" 
                    style="height:32px;padding:3px; margin-bottom:4px;" 
                    ImageUrl="<%$ Resources:Images, yahoo %>" CommandArgument="http://yahoo.com" 
                    runat="server" onclick="btnOpenID_Click" />
            </div>      
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="asizeright" Runat="Server">
</asp:Content>

